package com.lzp.common.batch;

import com.lzp.entity.WechatBill;
import com.lzp.workframe.mapStruct.WechatBillStruct;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.FieldSet;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author : lzp
 * @version 1.0
 * @date : 2022/10/19 15:57
 * @apiNote : TODO
 */
@Component
public class AliPayFieldSetMapper  implements FieldSetMapper<WechatBill> {
    @Resource
    WechatBillStruct wechatBillStruct;
    @Override
    public WechatBill mapFieldSet(FieldSet fieldSet) {
        return wechatBillStruct.alipayField2Entity(fieldSet);
    }

}
